/**
 * 路由配置
 */
import React from "react";
import { Router, Route, IndexRoute, hashHistory } from "react-router";

import Frame from "../layouts/Frame";
import Home from "../pages/home/index";
import Detail from "../page/detail/index";

//使用react-router 提供的组件 定义应用的路由
const AppRoute = function() {
  return (
    //   <Router history={hashHistory}>
    //     <Route path="/" component={Home} />
    //     <Route path="/detail/:id" component={Detail} />
    //   </Router>

    //改造
    <Router history={hashHistory}>
      <Route breadcrumbName="home页" path="/" component={Frame}>
        <IndexRoute component={Home} />
        <Route path="/detail/:id" component={Detail} />
      </Route>
    </Router>
  );
};

export default AppRoute;
